package com.liuwei.msmall.cart.service;

import com.liuwei.msmall.cart.vo.CartItemVo;
import com.liuwei.msmall.cart.vo.CartVo;

import java.util.List;
import java.util.concurrent.ExecutionException;

/**
 * @Classname CartService
 * @Description TODO
 * @Date 2020/6/28 12:26
 * @Created by 刘
 */
public interface CartService {

    CartItemVo addCart(Long skuId, Integer count) throws ExecutionException, InterruptedException;

    CartItemVo getCartItemBySkuId(String skuId);

    CartVo getCart() throws ExecutionException, InterruptedException;

    void deleteCartBykey(String key);

    void updateCartChecked(String skuId, String checked) throws ExecutionException, InterruptedException;

    void updateCartCount(String skuId, String count) throws ExecutionException, InterruptedException;

    void deleteItemBySkuId(Long skuId);

    void updateBatchCartChecked(String[] skuIds, String checked);

    void deleteBatchItemBySkuId(String[] skuIds);

    //获取当前登录用户的已选购物项
    List<CartItemVo> getCurrentUserCartItem() throws ExecutionException, InterruptedException;

    Integer getCartNum();

}
